﻿using System.Windows;
using System.Windows.Input;
using SimpleTool.Base;
using SimpleTool.SerialTool.SerialControl;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Xaml.Behaviors;
using Serilog.Core;
using Serilog;
using System.Security.Policy;
using static SimpleTool.TransformComponent.EnjoyRichTextBox;
using System.Text.RegularExpressions;
using System.Windows.Documents;
using System.Collections.ObjectModel;
using SimpleTool.Server;


namespace SimpleTool;


/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{

    public MainWindow()
    {
        App MyApp = (App)Application.Current;

        this.Title = "SimpleTools";

        MainViewModel ViewModel = MyApp.RetailSection.GetRequiredService<MainViewModel>();

        DataContext = ViewModel; // 设置上下文为当前窗口

        InitializeComponent(); // 窗口初始化

    }
}